
//
// 101116 - AH - Created.
// 101119 - AH - Java doc. included.
// 101215 - AH - Removed old main test program.
// 101219 - AH - Removed not used public methods.
// 110119 - AH - (Hector) Removed commented away code.
// 110130 - AH - (Bien) Integrated real and new ConventionPanel.
// 110327 - AH - (Fantoft Club) Fixes related to making sparewheel work in chat.
// 120130 - AH - Removed ref. to ConventionPanel.
//

package org.soekrat.gui.swing.chat;

import java.awt.BorderLayout;

import javax.swing.JPanel;
import javax.swing.JSplitPane;

import org.soekrat.engine.Soekrat2Engine;

/**
 * <p>
 *   End user (visitor) chat component. 
 * </p>
 * @author Arne Halvorsen (AH)
 * @author Laetitia Le Chatton (LLC)
 */
@SuppressWarnings("serial")
public final class VisitorMultiLineChatPanel extends JPanel 
{
  private final ConversationPanel m_cp; // For history.
  
  private final MultiChatPanel m_mcp;
  
  /**
   * <p>
   *   Constructor.
   * </p>
   * @param engine The engine the UI interfaces to.
   */
  public VisitorMultiLineChatPanel(Soekrat2Engine engine)
  {
    if (engine==null)
    {
      throw new NullPointerException("engine");  
    }
    
    setLayout(new BorderLayout());
    
    m_cp=new ConversationPanel();
    
    m_mcp=new MultiChatPanel(engine, m_cp/*, m_cop*/);
    
    JSplitPane sp=new JSplitPane(JSplitPane.VERTICAL_SPLIT);
    sp.setLeftComponent(m_cp);
    sp.setRightComponent(m_mcp);
    sp.setDividerLocation(200);  
    
    add(sp, BorderLayout.CENTER);
  }
  
}
